package com.ophiux.cs.application.user.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ophiux.cs.application.core.Result;
import com.ophiux.cs.application.user.dto.D_GetDoctorUserInfoRequest;
import com.ophiux.cs.application.user.dto.D_GetDoctorUserInfoResponse;
import com.ophiux.cs.application.user.dto.LoginRequest;
import com.ophiux.cs.application.user.dto.LoginResponse;
import com.ophiux.cs.application.user.dto.addUserByDoctorRequest;
import com.ophiux.cs.application.user.dto.addUserByDoctorResponse;
import com.ophiux.cs.application.user.dto.addUserInfoRequest;
import com.ophiux.cs.application.user.dto.addUserInfoResponse;
import com.ophiux.cs.application.user.dto.addUserRecoreRequest;
import com.ophiux.cs.application.user.dto.addUserRecoreResponse;
import com.ophiux.cs.application.user.dto.getPatientInfoRequest;
import com.ophiux.cs.application.user.dto.getPatientInfoResponse;
import com.ophiux.cs.application.user.dto.getUserByUseridRequest;
import com.ophiux.cs.application.user.dto.getUserByUseridResponse;
import com.ophiux.cs.application.user.dto.getUserRecoreRequest;
import com.ophiux.cs.application.user.dto.getUserRecoreResponse;
import com.ophiux.cs.application.user.dto.updateUserInfoRequest;
import com.ophiux.cs.application.user.dto.updateUserInfoResponse;
import com.ophiux.cs.application.user.impl.recore.AddUserRecoreService;
import com.ophiux.cs.application.user.impl.recore.getUserRecoreService;
import com.ophiux.cs.application.user.impl.user.GetDoctorUserInfoService;
import com.ophiux.cs.application.user.impl.user.UserLoginService;
import com.ophiux.cs.application.user.impl.user.addUserByDoctorService;
import com.ophiux.cs.application.user.impl.user.addUserPatientInfoService;
import com.ophiux.cs.application.user.impl.user.getUserByUseridService;
import com.ophiux.cs.application.user.impl.user.getUserInfoByPatientService;
import com.ophiux.cs.application.user.impl.user.updateUserInfoService;
import com.ophiux.cs.application.user.service.IUserAppService;

@Service
public class UserAppService implements IUserAppService{

	@Autowired
	UserLoginService userLoginService;//用户登录服务
	@Autowired
	AddUserRecoreService addUserRecoreService;//添加用户登录记录信息 服务
	@Autowired
	getUserInfoByPatientService getUserInfoByPatientService;//获取患者的用户信息
	@Autowired
	addUserPatientInfoService addUserPatientInfoService;//添加患者用户信息服务
	@Autowired
	getUserRecoreService getUserRecoreService;//获取用户登录记录信息服务
	@Autowired
	updateUserInfoService updateUserInfoService;//用户信息修改服务
	@Autowired
	addUserByDoctorService addUserByDoctorService;//添加用户（医生）
	@Autowired
	getUserByUseridService getUserByUseridService;//根据UserId获取用户信息服务
	@Autowired
	GetDoctorUserInfoService getDoctorUserInfoService;
	
	public Result<LoginResponse> Login(LoginRequest dto) {
		return userLoginService.Login(dto);
	}

	@Override
	public Result<addUserRecoreResponse> addUserRecore(addUserRecoreRequest dto) {
		return addUserRecoreService.addUserRecore(dto);
	}

	@Override
	public Result<getPatientInfoResponse> getUserInfoByPatient(getPatientInfoRequest dto) {
		return getUserInfoByPatientService.getUserInfoByPatient(dto);
	}

	@Override
	public Result<addUserInfoResponse> addUserInfo(addUserInfoRequest dto) {
		return addUserPatientInfoService.addUserInfo(dto);
	}

	@Override
	public Result<getUserRecoreResponse> getUserRecore(getUserRecoreRequest dto) {
		return getUserRecoreService.getUserRecore(dto);
	}

	@Override
	public Result<updateUserInfoResponse> updateUserInfo(updateUserInfoRequest dto) {
		return updateUserInfoService.updateUserInfo(dto);
	}

	@Override 
	public Result<addUserByDoctorResponse> addUserByDoctor(addUserByDoctorRequest dto) {
		return addUserByDoctorService.addUserByDoctor(dto);
	}

	@Override
	public Result<getUserByUseridResponse> getUserByUserid(getUserByUseridRequest dto) {
		return getUserByUseridService.getUserByUserid(dto);
	}

	@Override
	public Result<D_GetDoctorUserInfoResponse> getDoctorUserInfo(D_GetDoctorUserInfoRequest dto) {
		return getDoctorUserInfoService.getDoctorUserInfo(dto);
	}
}
